<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='../../vue.js'></script>
</head>

<body>
    <div id='app'>
        <h1>{{count}}</h1>
        <h1>{{count2}}</h1>

        <!-- vue的diff在生成新的虚拟dom和旧的虚拟dom比较时，只改动发生更新变化的节点 -->
        <button @click="count++">更改count</button>
    </div>
    <script>
        /* 设置为 false 以阻止 vue 在启动时生成生产提示 */
        Vue.config.productionTip = false;
        const vm = new Vue({
            el: '#app',
            data() {
                return {
                    count:0,
                    count2:1
                }
            }
        })
    </script>
</body>
</html>